package org.hilo.boot.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.DeleteProvider;

import tk.mybatis.mapper.annotation.RegisterMapper;

/**
 * 通用Mapper接口,根据 id数组 删除
 *
 * @author zollty
 */
@RegisterMapper
public interface DeleteByIdsMapper<T> {

    /**
     * 根据主键字符串进行删除，类中只有存在一个带有@Id注解的字段
     *
     * @param ids 如 "1,2,3,4"
     * @return
     */
    @DeleteProvider(type = IdBatchProvider.class, method = "dynamicSQL")
    int deleteByIds(List<?> ids);

}
